

package com.hazelcast.map.impl.mapstore.writebehind.entry;

import com.hazelcast.map.MapStore;

import javax.annotation.Nullable;
import java.util.UUID;

/**
 * General contract for an entry to be stored into {@link MapStore}
 * when {@link com.hazelcast.config.MapStoreConfig#writeDelaySeconds} is greater than 0.
 *
 * @param <K> the key type.
 * @param <V> the value type.
 * @see AddedDelayedEntry
 * @see DeletedDelayedEntry
 * @see NullValueDelayedEntry
 */
public interface DelayedEntry<K, V> {

    K getKey();

    V getValue();

    long getExpirationTime();

    long getStoreTime();

    void setStoreTime(long storeTime);

    int getPartitionId();

    long getSequence();

    void setSequence(long sequence);

    @Nullable
    UUID getTxnId();

    void setTxnId(UUID txnId);
}
